use serde::{Deserialize, Serialize};

/// 业务表 api_biz
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct BizEntity {
    /** 主键 */
    pub id: u64,
    /** 业务线名称 */
    pub biz_name: String,
    /** 业务线排名 */
    pub biz_order: u64,
}

impl BizEntity {
    pub fn new(biz_name: String, biz_order: u64) -> Self {
        Self {
            id: 0,
            biz_name,
            biz_order
        }
    }

    pub fn new_with_id(id: u64, biz_name: String, biz_order: u64) -> Self {
        Self {
            id,
            biz_name,
            biz_order
        }
    }
}